/**
 * @author:cloud.lg
 * @date:2021.3.26
 * @description:这里主要包含后台接口的定义
 * @module menu 菜单模块
 */
import {get, post, fetch } from '../fetch'

//菜单列表
export const menuList = (params) => fetch('/menu', params, 'query', 'get')

//新增菜单
export const addMenu = (params) => post('/system/menu/add', params, 'json')

//获取菜单详情
export const getMenuDetail = (params) => get('/system/menu/' + params.id, {}, 'json')

//编辑菜单
export const editMenu = (params) => post('/system/menu/edit', params, 'json')

//菜单状态修改
export const editMenuStatus = (params) => get('/system/menu/' + params.menuId + '/' + params.status, {}, 'json')

//查询APP供应商角色菜单
export const findPartnerMenuList = (params) => post('/user/tcbMenu/findPartnerMenuList', params, 'json')

//APP角色批量添加菜单
export const batchAddMenuByRoleId = (params) => post('/user/tcbRoleMenuRef/batchAddMenuByRoleId', params, 'json')

//查询APP供应商用户菜单
export const findPartnerUserMenuList = (params) => post('/user/tcbMenu/findPartnerUserMenuList', params, 'json')

//角色批量添加按钮权限
export const addFunctionAuthority = (params) => post('/system/rolemenu/addFunctionAuthority', params, 'json')

// 查询供应商角色菜单
export const getRoleMenuTree = (params) => post('/system/rolemenu/getRoleMenuTree', params, 'json');

//获取权限角色
export const getMenuRoleList = (params) => get('/system/rolemenu/getRoleList', params, 'json')

//获取路由
export const getRouters = (params) => get('/getRouters', params, 'json')